package com.emou.service.impl;

import com.emou.bean.Register;
import com.emou.dao.RegisterDao;
import com.emou.service.RegisterService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created on 2021/2/2.
 *
 * @author Emou
 */
@Service
public class RegisterServiceImp implements RegisterService {
    @Autowired
    private RegisterDao registerDao;

    @Override
    public List<Register> selectRegister() {
        return registerDao.selectRegister();
    }

    @Override
    public boolean insertRegister(Register register) {
        registerDao.insertRegister(register);
        return true;
    }

    @Override
    public boolean deleteRegister(Integer id) {
        registerDao.deleteRegister(id);
        return true;
    }

    @Override
    public Register selectRegisterById(Integer id) {
        Register register = registerDao.selectRegisterById(id);
        return register;
    }

    @Override
    public boolean updateRegister(Register register) {
        registerDao.updateRegister(register);
        return true;
    }
}
